﻿using HandyControl.Controls;
using HandyControl.Tools;
using System.Windows;

namespace LpbPrj.Client.Controls;

/// <summary>
/// string
/// </summary>
public class StringPropertyEditor : PropertyEditorBase
{
    public override FrameworkElement CreateElement(PropertyItem propertyItem)
    {
        var textBox = new System.Windows.Controls.TextBox
        {
            IsEnabled = !propertyItem.IsReadOnly,
            Style = ResourceHelper.GetResource<System.Windows.Style>("TextBoxDefaultStyle"),
        };

        return textBox;
    }

    public override DependencyProperty GetDependencyProperty() => System.Windows.Controls.TextBox.TextProperty;
}
